﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RealTimeCharts.LineChart
{ 
    public class ValueRange
    {
        /// <summary>
        /// 最小值
        /// </summary>
        public double minValue;
        /// <summary>
        /// 最大值
        /// </summary>
        public double maxValue;

        public ValueRange()
        {
            minValue = double.NaN;
            maxValue = double.NaN;
        }

        public ValueRange(ValueRange value)
        {
            minValue = value.minValue;
            maxValue = value.maxValue;
        }

        public ValueRange Clone()
        {
            return new ValueRange(this);
        }

        public void Copy(ValueRange value)
        {
            minValue = value.minValue;
            maxValue = value.maxValue;
        }

        public double Size()
        {
            return (maxValue - minValue);
        }
    }
}
